﻿
namespace GmailChecker.Utils
{
    static class Period
    {
        public static int GetMilliseconds(string periodString)
        {
            int seconds;

            switch (periodString)
            {
                case "5 seconds":
                    seconds = 5;
                    break;
                case "30 seconds":
                    seconds = 30;
                    break;
                case "minutes":
                    seconds = 60;
                    break;
                case "hours":
                    seconds = 60 * 60;
                    break;
                default:
                    seconds = 30;
                    break;
            }

            return 1000 * seconds;
        }
    }
}
